Quantum rejection sampling

ABSTRACT

Systems and methods for transforming an initial quantum state to a target quantum state are disclosed. The initial quantum state is denoted by superposed initial quantum sample states and the target quantum state is denoted by superposed target quantum sample states. The initial quantum state is initialized with a set of primary registers for the initial quantum state and with at least one ancillary register. The initial quantum state is transformed such that the set of primary registers reflects the initial quantum sample states and the at least one ancillary register is varied to compose an intermediate quantum state. In addition, the intermediate quantum state is amplified by implementing quantum state rotations in accordance with a plurality of reflections on the intermediate quantum state such that the reflections result in the target quantum sample states of the target quantum state with a discarding of the at least one ancillary register.

RELATED APPLICATION INFORMATION

This application claims priority to provisional application Ser. No. 61/442,421 filed on Feb. 14, 2011, incorporated herein by reference.

BACKGROUND

1. Technical Field

The present invention relates to quantum computing and, more particularly, to systems, methods and devices for preparing quantum states.

2. Description of the Related Art

Rejection sampling is a technique for producing samples from a target distribution by starting from samples from another distribution. The method has first been formalized by von Neumann (1951) and has many applications in classical computing. The classical rejection method solves the following resampling problem: given the ability to sample according to some probability distribution p, produce samples from some other distribution q. The method works as follows: let γ≦1 be the largest scaling factor such that γq lies under p, formally, γ=min_(k)(p_(k)/q_(k)). A sample k is accepted from p with probability γq_(k)/p_(k), otherwise the sample is rejected and the process is repeated. The expected number of samples from p to produce one sample from q is then given by T=1/γ=max_(k)(q_(k)/p_(k)), which has been proved to be optimal. FIG. 11 provides a visualization of this sampling method. In particular, FIG. 11 is a graph 1100 of Probability v. Sample space (denoted by variable k), where curve 1102 is an example of p_(k) and curve 1104 is an example of γq_(k). As indicated above,

${{Prob}\left( {{accept}\mspace{14mu} k} \right)} = {\frac{\gamma \; q_{k}}{p_{k}}.}$

This technique is at the core of many sampling algorithms and has therefore numerous applications, in particular, in the field of Monte Carlo simulations, the most well-known example being the Metropolis algorithm. It is used extensively in Monte Carlo simulations since the simulations seek to sample from distributions that are defined on some extremely high-dimensional spaces and for which sometimes no direct way of sampling is known. Rejection sampling then permits sampling from the target distribution, provided that another, much easier to obtain, distribution can be sampled from.

SUMMARY

One embodiment is directed to a method for transforming an initial quantum state, denoted by superposed initial quantum sample states, to a target quantum state, denoted by superposed target quantum sample states. The initial quantum state is initialized with a set of primary registers for the initial quantum state and with at least one ancillary register. The initial quantum state is transformed such that the set of primary registers reflects the initial quantum sample states and such that the at least one ancillary register is varied to compose an intermediate quantum state. In addition, the intermediate quantum state is amplified by implementing quantum state rotations in accordance with a plurality of reflections on the intermediate quantum state such that the reflections result in the target quantum sample states of the target quantum state with a discarding of the at least one ancillary register.

An alternative embodiment is directed to computer readable storage medium comprising a computer readable program. The computer readable program when executed on a computer causes the computer to direct the transformation of an initial quantum state, denoted by superposed initial quantum sample states, to a target quantum state, denoted by superposed target quantum sample states, by performing steps of a method. In accordance with the method, the initial quantum state is initialized with a set of primary registers for the initial quantum state and with at least one ancillary register. In addition, a transformation of the initial quantum state is directed such that the set of primary registers reflects the initial quantum sample states and such that the at least ancillary register is varied to compose an intermediate quantum state. Further, the steps of the method include directing an amplification of the intermediate quantum state by implementing quantum state rotations in accordance with a plurality of reflections on the intermediate quantum state such that the reflections result in the target quantum sample states of the target quantum state with a discarding of the at least one ancillary register.

Another embodiment is directed to a system for transforming an initial quantum state, denoted by superposed initial quantum sample states, to a target quantum state, denoted by superposed target quantum sample states. The system includes a quantum memory element, a quantum interaction controller and a quantum computation module. The quantum interaction controller is configured to change quantum states of the quantum memory element by implementing quantum state rotations. In addition, the quantum computation module is configured to initialize the initial quantum state with a set of primary registers for the initial quantum state and with at least one ancillary register. The quantum computation module is further configured to direct the quantum interaction controller to transform the initial quantum state such that the set of primary registers reflects the initial quantum sample states and the at least one ancillary register is varied to compose an intermediate quantum state. Additionally, the quantum computation module is also configured to direct the quantum interaction controller to amplify the intermediate quantum state by implementing the quantum state rotations in accordance with a plurality of reflections on the intermediate quantum state such that the reflections result in the target quantum sample states of the target quantum state with a discarding of the at least one ancillary register.

These and other features and advantages will become apparent from the following detailed description of illustrative embodiments thereof, which is to be read in connection with the accompanying drawings.

BRIEF DESCRIPTION OF DRAWINGS

The disclosure will provide details in the following description of preferred embodiments with reference to the following figures wherein:

FIG. 1 is a high-level block/flow diagram of an overview of a classical rejection sampling method.

FIG. 2 is a high-level block/flow diagram of an overview of an embodiment of a quantum rejection sampling method.

FIG. 3 is a high-level block/flow diagram of an embodiment of a system for transforming an initial quantum state to a target quantum state.

FIG. 4 is a high-level block/flow diagram of an embodiment of a quantum computation module.

FIG. 5 is a high-level flow diagram of a classical rejection sampling method.

FIG. 6 is a high-level flow diagram of an embodiment of a quantum rejection sampling method.

FIG. 7 is a high-level flow diagram of an embodiment of a method for transforming an initial quantum state to a target quantum state.

FIG. 8 is a high-level block/flow diagram of an overview of an embodiment of a quantum rejection sampling method in which only one ancillary register is employed.

FIG. 9 is a diagram of an initial quantum state for a Boolean hidden shift problem example.

FIG. 10 is a diagram of a target quantum state for the Boolean hidden shift problem example.

FIG. 11 is a graph illustrating probability distributions according to a classical rejection sampling method.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

Embodiments of the present principles provide a means to prepare quantum states in a quantum computer. For example, the memory of a quantum computer can in principle be loaded with arbitrary quantum states. Preparing arbitrary quantum states in an efficient manner would lead to tremendous computational power. In particular, such formidable tasks as deciding whether two graphs are isomorphic or not could be decided easily, or any problem in Quantum Merlin Arthur (QMA), which is a quantum analog of the classical class of NP complete problems, could be decided easily. As such, in quantum computing is therefore desirable to find methods that permit the efficient preparation of selected target quantum states into the memory and to find algorithms that leverage the fact that a state preparation has already been performed successfully.

In accordance with one exemplary aspect, methods and systems described herein below can prepare specific quantum states by exploiting some additional information that is available about the states. The approach applied by embodiments utilizes a novel rejection sampling technique that permits sampling from a target probability distribution, provided that a sampler from a given distribution is available. In particular, a given quantum state can be mapped to a target quantum state by making a specific, controlled sequence of several rotations that bring the quantum state step-by-step closer to the target state. Given a black box producing a coherent superposition of quantum states with some amplitudes, the present principles can be used to prepare a coherent superposition of the same states with different target amplitudes.

Aspects described herein provide significant advantages over other solutions that address the general problem of quantum state generation. For example, the techniques described herein are significantly more efficient than approaches that attempt to solve quantum state preparation by applying sequences of controlled rotations (typically of exponential length) to fix the amplitudes of the target state one qubit at a time or other computationally expensive techniques that reduce the problem to instances of search problems. In contrast to the present principles, these approaches do not exploit the structure of the quantum mechanical memory system.

In accordance with aspects of the present principles, writes on a quantum memory can be efficiently implemented by employing amplitude modifications on quantum states through a series of transformations to configure the memory to be in desired target states. In particular, one or more ancillary registers can be employed to modify the amplitude of the quantum state of the memory such that a discarding of the register(s) results in the desired target state. As discussed in more detail herein below, only one ancillary register can be sufficient for this purpose. Here, the quantum states of samples of the memory can be kept constant and the amplitudes of the quantum states can be varied by implementing quantum state rotations. As such, a given initial state can be modified or “massaged” toward a target state using quantum state rotations. Writing and reading the quantum memory in this way is substantially more efficient than brute-force quantum state preparation methods described above, which consume much more resources and are considerably slower than the present methods.

There are several potential applications of the methods and system described herein. For example, they can be used as tools for the design of new quantum algorithms. Moreover, in some cases, they can be used as a direct solution to a problem such as the hidden shift problem for Boolean functions. The methods can also provide an optimal algorithm that can be derived by studying a “water-filling” of the Fourier spectrum of the given Boolean function.

Embodiments described herein may be entirely hardware or may include both hardware and software elements. In a preferred embodiment, the present invention is implemented in hardware and software, which includes but is not limited to firmware, resident software, microcode, etc.

Embodiments may include a computer program product accessible from a computer-usable or computer-readable medium providing program code for use by or in connection with a computer or any instruction execution system. A computer-usable or computer readable medium may include any apparatus that stores, communicates, propagates, or transports the program for use by or in connection with the instruction execution system, apparatus, or device. The medium can be magnetic, optical, electronic, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium. The medium may include a computer-readable storage medium, such as a semiconductor or solid state memory, magnetic tape, a removable computer diskette, a random access memory (RAM), a read-only memory (ROM), a rigid magnetic disk and an optical disk, etc.

A data processing system suitable for storing and/or executing program code may include at least one processor coupled directly or indirectly to memory elements through a system bus. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code to reduce the number of times code is retrieved from bulk storage during execution. Input/output or I/O devices (including but not limited to keyboards, displays, pointing devices, etc.) may be coupled to the system either directly or through intervening I/O controllers.

Network adapters may also be coupled to the system to enable the data processing system to become coupled to other data processing systems or remote printers or storage devices through intervening private or public networks. Modems, cable modem and Ethernet cards are just a few of the currently available types of network adapters.

In accordance with exemplary embodiments described herein, a quantum form of rejection sampling is developed. Given a coherent superposition of (possibly unknown) quantum mechanical states with some amplitudes, the methods described herein prepare a coherent superposition of the same states, albeit with different target amplitudes. The methods can achieve this task through several steps. First, a quantum register is initialized with the given coherent superposition of states. Then, an additional quantum register, which acts as an ancillary register, is added to the overall system and initialized in a known state. Subsequently, the register holding the initial superposition and the ancillary register are transformed by applying a controlled rotation of the ancillary register. The angle of this controlled rotation depends on the state of the register holding the initial superposition. By carefully choosing the angle of this rotation, it is possible to rotate the amplitudes of these two registers in such a way that it becomes precisely the amplitude of the target state, provided that the ancillary register is in the known state mentioned before. The rotation itself is implemented by an amplitude amplification process. The final step of the procedure includes measuring the ancillary register and, conditioned on the outcome of the measurement, selecting only the runs of the process in which the ancillary register was found in the ground state.

As demonstrated in this disclosure, it becomes possible to prepare any intended target state from any given initial state, while preserving possible entanglement of the initial state with further states. We provide a tight characterization of the number of preparations of the initial state that is used to solve this quantum state generation problem. The analysis is based on semi-definite programming and demonstrates that the associated algorithm is optimal with regard to the number of initial state preparations that are used in any algorithm that seeks to prepare the final state from the initial state.

In an important application, the method can be used to solve hidden shift problems over the Boolean hypercube. In such problems, the task is to identify an unknown offset (‘shift’) between two functions. The difficulty consists in identifying the offset in as few invocations of the two functions as possible. Using the quantum rejection sampling method, it is possible to identify the hidden shift in a number of invocations that is given by “water filling” vectors of the Fourier spectra of the two functions.

Prior to discussing embodiments of the present principles in detail some basic aspects of quantum state preparation should be noted. As indicated above, quantum state preparation can be considered as a quantum counterpart of classical sampling and as such is a very useful technique in quantum computing. Indeed, many algorithmic problems reduce to quantum state preparation problems. For example, Graph Isomorphism reduces to preparing the uniform distribution over permutations of a graph. A quantum version of the resampling problem is developed herein below: given an oracle generating a quantum state Σ_(k=1) ^(n)α_(k)|ξ_(k)

|k

, where amplitudes α_(k) are known but states |ξ_(k)

are unknown, prepare a target state Σ_(k=1) ^(n)β_(k)|ξ_(k)

|k

with the different amplitudes β_(k) but the same states |ξ_(k)

. Quantum resampling is a useful primitive for building quantum algorithms.

1. Classical and Quantum Models

To aid in understanding the quantum rejection sampling embodiments of the present principles, the classical and quantum sampling problems are formalized herein below. To make the problem meaningful in the context of query complexity, some slight adaptations should be made. Indeed, if distribution q is known to begin with, there is no need to use the ability to sample from p. As such, we introduce a function ξ that deterministically associates some unknown data with each sample with the constraint that this data is preserved during the sampling process in the following sense:

Definition 1 (Resampling problem): Let p, q be probability distributions over [n]. Given oracle access to a black box producing pairs (k,ξ(k))∈[n]×[d] such that k is distributed according to p, where ξ:[n]→[d] is an unknown function, the SAMPLING_(p→q) problem is to produce a sample (k,ξ(k)) such that k is distributed according to q.

In this model it is no longer possible to produce the needed samples without using the access to the oracle that produces the samples from p. The rejection method can be used to solve this problem. FIG. 1 provides an exemplary illustration of the classical rejection sampling method.

In accordance with aspects of the present principles, SAMPLING_(p→q) is adapted for quantum states, where probability distributions are replaced by quantum superpositions. Aspects described herein consider any initial superposition to permit approximate preparation of the target state. FIG. 2 provides an exemplary illustration of the classical rejection sampling method.

Definition 2 (Quantum resampling problem): Let α,β∈R^(n) be such that ∥α∥₂=∥β∥₂=1 and α_(k),β_(k)≧0 for all k∈[n]. Let 0 be a unitary that acts on a default state | 0

_(dn)∈C^(d)

C^(n) as

O=| 0

_(dn)

|α

:=Σ_(k=1) ^(n)α_(k)|ξ_(k)

|k

,  (1)

where |ξ_(k)

∈C^(d) are some fixed unknown normalized quantum states. Given oracle access to unitary black boxes O,O^(†), the QSAMPLING_(α→β) problem is to prepare the state

$\begin{matrix} {{b\rangle} = {\sum\limits_{k = 1}^{n}{\beta_{k}{\xi_{k}\rangle}{{k\rangle}.}}}} & (2) \end{matrix}$

For any success probability p, the QSAMPLING_(α→β) ^(p) problem corresponds to the approximate version where it is sufficient to prepare a state |c

:=Σ_(k=1) ^(n)γ_(k)|ξ_(k)

|k

such that |

b|c

²≧p (where ∥γ∥₂=1 and γ_(k)≧0 for all k∈[n]).

It should be noted that a special case of this problem is the scenario d=1, when ξ_(k)∈C are just unknown phases (complex numbers of absolute value 1).

2. Preliminary Points

In accordance with the present principles, a full characterization of the query complexity of QSAMPLING_(α→β) ^(p) can be made as follows.

Theorem 1. Let p_(min):=(β^(T)·α)² and p_(max):=Σ_(k:α) _(k) _(>0)|β_(k)|². The quantum query complexity of QSAMPLING_(α→β) ^(p) for p∈[p_(min), p_(max)] is Θ(1/∥ε∥₂), where ε_(k)=min{α_(k), γβ_(k)} for γ∈{0,1} such that β^(T)·{circumflex over (ε)}=√{square root over (p)}. For p≦p_(min), the query complexity is 1, and for p>p_(max), it is infinite.

Here {circumflex over (ε)}:=ε/∥ε∥₂ denotes a unit vector in direction ε. It is noted that when p=p_(max)=1, the query complexity reduces to max_(k)(β_(k)/α_(k)), similar to the classical case, except that amplitudes replace probabilities.

It should be further noted that the techniques described herein can be applied to the following problem.

Definition 3 (Boolean hidden shift problem). Let ƒ:F₂ ^(n)→F₂ be a Boolean function. The Boolean hidden shift problem for ƒ (BHSP_(f)) is the following: given oracle access to shifted function ƒ_(s)(x):ƒ(x+s) for some unknown value of s∈F₂ ^(n), with the promise that there exists x such that ƒ(x+s)≠ƒ(x), determine the value of s.

As shown herein below, this problem can be solved by solving the QSAMPLING_(α→β) ^(p) problem for α corresponding to the Fourier spectrum of ƒ, and β being a uniformly flat vector. This leads to the following upper bound.

Theorem 2. Let ƒ be a Boolean function and {circumflex over (ƒ)} denote its Fourier transform. The quantum query complexity of solving BHSP_(f) with success probability p is O(1/∥ε∥₂), where ε_(w)=min{|{circumflex over (ƒ)}_(w)|,γ/√{square root over (2^(n))}} for γ∈[0,1] such that ∥{circumflex over (ε)}∥₁=√{square root over (2^(n)p)}.

3. Quantum Rejection Sampling Methods and Systems

The exemplary methods described herein below are based on amplitude amplification on an ancillary register. A corresponding algorithm is described in a general form and it is shown that its cost can be captured by a semidefinite program (SDP). In particular, a sequence of alternating reflections can be applied, where its query complexity is given by a semidefinite program. Solutions of this SDP, and hence the corresponding algorithms applied, can depend on the ratio between the amplitudes of the initial and target states. The cost is characterized by solving this SDP, and it is shown that it has a rank-1 solution. This implies that it suffices to use just one ancillary qubit to perform the amplitude amplification. This observation permits a significant simplification of the algorithm. The simplified algorithm with a single qubit ancillary register is given explicitly in Section 3.3 below.

3.1 Description of the Systems and Methods

With reference now to FIG. 3, an exemplary embodiment of a quantum computer system 300 that can implement the methods described herein in accordance with the present principles is illustratively depicted. The quantum computer system 300 can include classical and quantum components. For example, the system 300 can include a classical/conventional computer device 302, an input/output (I/O) interface 304 and a quantum mechanical component 306, which comprises functions or modules for quantum control 308 on a quantum memory device 309, a quantum computation module 310 and a quantum measurement module 312. The elements 308, 310 and 312 can each be implemented in hardware or hardware and software, as stated above. As described in more detail herein below, the quantum computation module 310 can employ the quantum controller 308 to initialize the quantum memory 309 in a desired target quantum state. For example, the quantum computation module 310 can be configured to determine changes of quantum states, such as, for example, appropriate reflections, that can be implemented by the quantum controller 308 on the physical quantum memory 309. In addition, the quantum measurement module 312 can be configured to measure the state of the quantum memory 309 to enable the quantum computation module 310 to determine whether the quantum controller 308 had effected the changes in the quantum memory 309. Moreover, the quantum measurement module 312 can be configured to perform measurements on the quantum memory 309 to output data stored in the memory in response to read requests through the I/O interface 304.

It should be noted that exemplary embodiments can employ superconducting qubits. For example, in one practicable application, a concrete description of a quantum mechanical system in the form of a Hamiltonian is considered. A natural time evolution of a system governed by a Hamiltonian H for a time t is given by a unitary operator e^(−iHt). The Hamiltonian that describes the physical system can be, e.g., of ZZ-type or of the form:

$H = {{\sum\limits_{j = 1}^{2}{\frac{\Omega_{j}}{2}\left( {{\cos \; \varphi_{j}\sigma_{x}^{j}} - {\sin \; \varphi_{j}\sigma_{y}^{j}}} \right)}} + {\frac{\Omega_{12}}{4}{\left( {{\sigma_{x}^{1}\sigma_{x}^{2}} - {\sigma_{y}^{3}\sigma_{y}^{4}}} \right).}}}$

Further embodiments of interest include superconducting qubits that are coupled using resonators. The quantum bits that are realized by the subsystems of the quantum mechanical system can be used as the elements of the quantum memory device 309.

The above-referenced equation for H shows the Hamiltonian for the natural coupling between two superconducting flux qubits. Here, Ω_(j) is the resonant microwave-induced single qubit Rabi frequency of qubit j. A typical value of Ω_(j) for a superconducting flux qubit system, realized as an Al/AlO_(x) low temperature superconducting circuit with Josephson Junctions, is between 4 and 7 GHz. Further, φ_(j) is the microwave phase, a real number between 0 and 2π, and σ_(y) ^(j) and σ_(x) ^(j) are Pauli spin matrices. The quantum interaction control module 308 can be implemented by applying microwave pulses at frequency Ω₁₂ which corresponds to the term in the Hamiltonian responsible for driving the sum-frequency transition. A typical frequency for the term Ω₁₂ is between 20 and 25 MHz.

The time-scale on which the control is applied depends strongly on the particular type of physical embodiment of the quantum computer. This also defines the limiting life time of the quantum memory that is implemented by the qubits. An example of a quantum computer built on low-temperature superconducting quantum circuits (Josephson Junctions) has values of T₂ of the order of a few nanoseconds and T₁ of the order of a few hundred nanoseconds. In recent realizations, the lifetime is even on the order of microseconds. Single qubit gates can be operated at frequencies between 4-6 GHz in a given implementation and two-qubit gates can be operated at frequencies between 20-25 MHz in the same implementation (as a low temperature Al/AlO_(x) superconductor).

Another embodiment can employ nuclear magnetic resonance (NMR) qubits. Here, H is the system Hamiltonian of a molecule in a liquid state NMR quantum computer or a molecule in a solid state NMR quantum computer. In the embodiment directed to a liquid state NMR, only Hamiltonians H having ZZ interactions are possible. Here, the quantum interaction control module 308 is implemented via an application of radio frequency (RF) pulses that are in resonance with the ZZ terms of the Hamiltonian, thereby driving the system. In this embodiment, the elements of the quantum memory device consist of spins. In the embodiment directed to solid state NMR, homonuclear and heteronuclear dipole-dipole interactions can occur. For liquid state NMR systems, time-scales of decoherence time T₂ of the order 1-2 seconds and relaxation times T₁ of 10-100 seconds have been observed. In another embodiment, the methods described herein can be applied to qubits implemented by an ion trap. Here, the quantum interaction control module 308 can be implemented via laser pulses that are directed at the ions and elements of the quantum memory device 309 are the internal degrees of freedom of the ions.

Referring to FIG. 4, with continuing reference to FIG. 3, a high-level block/flow diagram 400 of an exemplary process implemented by the quantum computation module 310 is illustratively depicted. In particular, by directing the quantum controller 308 to alter the state of the memory 309 and by utilizing the quantum measurement module 312 to confirm that the state of the memory 309 is altered appropriately, as described in more detail herein below, the quantum computation module 310 can perform quantum state preparation 402 and perform a series of unitary transformations 404 ₁-404 _(n). Specifically, the transformations can be employed to configure the quantum memory 309 in a desired target quantum state and thereby perform writes on the quantum memory 309 in an efficient manner. Here, the transformations can be utilized to change the amplitudes of a given quantum state towards a target quantum state.

With reference now to FIGS. 5 and 6, with continuing reference to FIG. 3, an exemplary overview of a classical rejection sampling method 500 and an exemplary overview of quantum rejection sampling method 600 in accordance with the present principles are respectively depicted. The classical rejection sampling method 500 can be referred to as an “accept/reject method” or “hit-and-miss sampling.” Intuitively, the basic premise of the method 500 is to fit the probability distribution P_(out) under a given distribution P_(in). This is achieved by generating a random number u in the interval (0,1). Then, a sample x that is produced using P_(in) is accepted if u is less than P_(out)(x)/(c P_(in)(x)), where c is a suitably chosen constant. For example, the method 500 can begin at step 502, at which models of the functions or objects considered can be obtained. At step 504, a sample can be generated for P_(in). In addition, at step 508, with the aid of a random number generator applied at step 506, a sample for P_(in) can be output if the above-recited constraint is met. Further, a sample for P_(out) can also be output if the above-recited constraint is met. Thereafter, the method can be repeated.

In accordance with the exemplary quantum rejection sampling method 600, a given quantum input state Q_(in) can be changed to a desired output quantum state Q_(out). The method proceeds by applying stepwise rotations to bring the state closer to the target state. The process is stopped once a specified target accuracy has been achieved. The controlled rotations can be applied to one qubit only. The method 600 can begin at step 602, at which the quantum computation module 310 can obtain models of the functions or objects considered. For example, the quantum computation module 310 can generate the models or can receive the models, for example, through the I/O interface 304 from the conventional computer 302. At step 604, the quantum computation module 310 can generate a state for Q_(in). At step 606, the quantum computation module 310 can output the state for Q_(in) and can direct the quantum interaction controller 308 to apply controlled unitary rotations at step 608, as described in more detail herein below, to obtain a modified state of Q_(in) in the memory 309, which can be measured by the quantum measurement module 312. Based on the measurements made by the quantum measurement module 312, the quantum computation module 310 can determine whether a target state within the specified target accuracy has been achieved. If not, then the method can proceed to and repeat step 608. If a target state within the specified target accuracy has been achieved, then the method can proceed to step 614 and can output a sample for Q_(out) and the method can be repeated.

As indicated above, method implementations of the present principles for QSAMPLING_(α→β) ^(p) can be based on amplitude amplification. It is parameterized by states {|φ_(k)

∈C^(n):1≦k≦n} and a projector Π to some subspace of C^(n). We will show that the problem of optimizing these parameters can be cast as an SDP and its solution is described further herein below.

Initially, the oracle can be used to prepare the state |a

, and then a third register of dimension n, initialized in some default state |{circumflex over (0)}

_(n), is attached:

$\begin{matrix} {{O{{\overset{\_}{0}\rangle}_{dn} \otimes {\overset{\_}{0}\rangle}_{n}}} = {{{a\rangle}{\overset{\_}{0}\rangle}_{n}} = {\sum\limits_{k = 1}^{n}{\alpha_{k}{\xi_{k}\rangle}{k\rangle}{{\overset{\_}{0}\rangle}_{n}.}}}}} & (3) \end{matrix}$

Then, controlled on the value of the second register, some fixed states |φ_(k)

∈C^(n) are prepared in the third register, which (apart from being normalized) are completely arbitrary. This provides

$\begin{matrix} {{{\psi\rangle} = {{{R \cdot {a\rangle}}{\overset{\_}{0}\rangle}_{n}} = {\sum\limits_{k = 1}^{n}{\alpha_{k}{\xi_{k}\rangle}{k\rangle}{\varphi_{k}\rangle}}}}},} & (4) \end{matrix}$

where R:=Σ_(k=1) ^(n)I_(d)

|k

k|

R(k) and R(k)| 0

_(n)=|φ_(k)

is an operation that prepares |φ_(k)

for given k.

If the last register of state |ψ

is measured with an orthogonal measurement {I_(n)−Π,Π}, where Π is some arbitrary projector, the probability of collapsing to subspace Π and the post-measurement state is given by

$\begin{matrix} {q:={{\langle{\psi {\left( {I_{d} \otimes I_{n} \otimes \Pi} \right)}\psi}\rangle} = {\sum\limits_{k = 1}^{n}{\alpha_{k}^{2}{\langle{\varphi_{k}{\Pi }\varphi_{k}}\rangle}}}}} & (5) \\ {{\psi_{\Pi}\rangle}:={\frac{1}{\sqrt{q}}{\sum\limits_{k = 1}^{n}{\alpha_{k}{\xi_{k}\rangle}{k\rangle}\Pi {{\varphi_{k}\rangle}.}}}}} & (6) \end{matrix}$

How close the reduced state of the first two registers of |ψ_(Π)

is to the desired state |b

, is characterized by

$\begin{matrix} {p:={{\left( {{\langle{b\left. {\otimes I_{n}} \right)}}\psi_{\Pi}}\rangle \right.}^{2} = {{{\frac{1}{\sqrt{q}}{\sum\limits_{k = 1}^{n}{\alpha_{k}\beta_{k}\Pi {\varphi_{k}\rangle}}}}}^{2} = {\frac{1}{q}{\sum\limits_{k,{l = 1}}^{n}{\alpha_{l}\beta_{l}\alpha_{k}\beta_{k}{\langle{\varphi_{l}{\Pi }\varphi_{k}}\rangle}}}}}}} & (7) \end{matrix}$

If both measurements were indeed performed, the overall success probability would be pq, which may be very small. This is not too surprising given that the oracle was used only once. However, instead of measuring the last register of the state |ψ_(Π)

, amplitude amplification is used, thus boosting the success probability at the cost of using more oracle calls.

The amplitude is amplified in the subspace Π of the second register. Let U:=R·(O

I_(n)) be the operation that with one query to oracle O prepares the state |ψ

=U| 0

_(dn)| 0

_(n) defined in equation (4). Then, the algorithm is given by the following sequence of unitary operations:

_(QRS):=(ref_(|ψ)

·ref_(I) _(d)

_(I) _(n)

_(Π))^(k) U,  (8)

where k=O(1/√{square root over (q)}) is the number of iterations of amplitude amplification. Here, reflections through the two subspaces are as follows:

ref_(I) _(d)

_(I) _(n)

_(Π) :=I _(d)

I _(n)

(I _(n)−2Π), ref_(|ψ)

:=I _(dn) ₂ −2|ψ

ψ|(9)

It is noted that the second reflection can also be expressed as follows:

ref_(|ψ)

=U(I _(d)

I _(n)

I _(n)−2| 0, 0, 0

0, 0, 0|)U ^(†)  (10)

so it can be implemented using two queries to O. Thus, the total number of queries used by this algorithm is 2k+1=O(1/√{square root over (q)}).

The final state

_(QRS)·| 0

_(d)| 0

_(n)| 0

_(n) is very close to |ψ

, so its reduced state on the first two registers, if measured, would collapse to |b

with probability p defined in equation (7). Thus, by using amplitude amplification, the overall success probability from pq top is boosted at the cost of increasing the number of oracle calls from 1 to T=Θ(1/√{square root over (q)}).

An implementation of the quantum rejection sampling algorithm is provided herein below in Table 1.

TABLE 1 Quantum Rejection Sampling Algorithm Quantum rejection sampling algorithm

_(QRS)   1. Start in initial state | 0 

 _(d)| 0 

 _(n)| 0 

 _(n).   2. Apply U.   3.  Perform the following steps k times:   -   perform ref_(I) _(d) 

 I_(n) 

 Π by applying I_(n) − 2Π on the last register;   -   perform ref_(|ψ )

 by applying U^(†), changing the relative      phase of | 0, 0, 0 

 by a factor of −1, and then applying U.   4. Discard the last register.

The quantum rejection sampling algorithm of Table 1 is written in pseudo-code. The algorithm starts with a known state in step 1, then applies a controlled rotation by some pre-computed angle in step 2. Further, the algorithm performs a sequence of steps, as shown in the form of a while loop in step 3, each of which is a controlled rotation. This loop leads to an improvement of the approximation of the intermediate quantum state. At step 4, only the register holding the output should be returned.

Referring now to FIG. 7, with continuing reference to FIG. 3, an exemplary method 700 for transforming an initial quantum state to a target quantum state of a quantum memory 309 is illustratively depicted. The algorithm of Table 1 is one exemplary implementation of the method 700. In addition, it should be understood that elements of the quantum component 306 can implement the method 700. Here, the initial quantum state can be denoted by superposed initial quantum sample states. For example, the initial quantum state can correspond to

${a\rangle} = {\sum\limits_{k = 1}^{n}{\alpha_{k}{\xi_{k}\rangle}{k\rangle}}}$

and the initial quantum sample states can correspond to |ξ_(k)

and |k

. Further, each of the respective sample states, for example, |ξ_(k)

and |k

, can have a respective initial amplitude denoted by α_(k). In turn, the target quantum state can be denoted by superposed target quantum sample states. For example, the target quantum state can correspond to

${b\rangle} = {\sum\limits_{k = 1}^{n}{\beta_{k}{\xi_{k}\rangle}{k\rangle}}}$

and the target quantum sample states can also correspond to |ξ_(k)

and |k

. Moreover, each of the respective sample states, for example, |ξ_(k)

and |k

, can have a respective initial amplitude denoted by β_(k).

At step 702, the quantum computation module 310 can initialize the initial quantum state with a set of primary registers for the initial quantum state and with at least one ancillary register. For example, with respect to equations (3) and (4), above, the primary registers can correspond to |ξ_(k)

and |k

and the ancillary register can correspond to | 0

_(n) and |φ_(k)

. As discussed in more detail herein below, the method can be implemented with only one ancillary register to achieve a sufficient degree of accuracy and performance.

At step 704, the quantum computation module 310 can direct the quantum interaction controller 308 to transform the initial quantum state such that the set of primary registers reflects the initial quantum sample states and such that the ancillary register(s) is/are varied to compose an intermediate quantum state. For example, as indicated in Table 1, the default state | 0

_(d)| 0

_(n)| 0

_(n) can be initialized and can undergo a transformation U. As stated above, the transformation U transforms the default state | 0

_(d)51 0

_(n)| 0

_(n) into the initial quantum state

${{{a\rangle}{\overset{\_}{0}\rangle}_{n}} = {\sum\limits_{k = 1}^{n}{\alpha_{k}{\xi_{k}\rangle}{k\rangle}{\overset{\_}{0}\rangle}_{n}}}},$

associated with both the primary registers and the ancillary register. As noted above, the initial quantum state can be obtained by applying an oracle, which models a known physical operation that can be performed by the quantum interaction controller 308 on the quantum memory 309 to achieve a state

${a\rangle} = {\sum\limits_{k = 1}^{n}{\alpha_{k}{\xi_{k}\rangle}{k\rangle}}}$

with known amplitudes α_(k) and unknown states |ξ_(k)

.

We define a single-qubit unitary operation R(k) as follows:

${R(k)}:={\frac{1}{\alpha_{k}}\begin{pmatrix} \sqrt{{\alpha_{k}}^{2} - \beta_{k}^{2}} & {- \beta_{k}} \\ \beta_{k} & \sqrt{{\alpha_{k}}^{2} - \beta_{k}^{2}} \end{pmatrix}}$

For those k for which α_(k)=0, operation R(k) can be defined arbitrarily.

This is a rotation by angle whose sine is equal to β_(k)/α_(k). When applied to the last register, controlled on the value of k, the operation U:=Σ_(k=1) ^(n)I_(d)

|k

k|

R(k) corresponds to rotations by different angles in mutually orthogonal subspaces.

If U is applied to the state |α

together with an ancillary qubit initialized in state |0

, the ancillary register is varied to compose an intermediate quantum state

${{\psi\rangle} = {{{U \cdot {a\rangle}}{\overset{\_}{0}\rangle}_{n}} = {\sum\limits_{k = 1}^{n}{\alpha_{k}{\xi_{k}\rangle}{k\rangle}{\varphi_{k}\rangle}}}}},$

where the states |φ_(k)

can be arbitrary values. Here, a controlled quantum state rotation by a pre-computed angle can be applied, as indicated above. Thus, the resulting intermediate state |ψ

can have the same amplitudes α_(k) as the initial quantum sample states that are reflected in the primary registers.

At step 706, the quantum computation module 310 can direct the quantum interaction controller 308 to amplify the intermediate quantum state. For example, the quantum computation module 310 can direct the quantum interaction controller 308 to implement quantum state rotations in accordance with a plurality of reflections on the intermediate quantum state. For example, the quantum computation module 310 and the quantum interaction controller 308 can implement the while loop of step 3 of the Algorithm described in Table 1 above. As discussed above, the reflections result in the target quantum sample states of the target quantum state with a discarding of the ancillary register(s). Here, it should be understood that the target quantum state can be understood to be a quantum state that is within the constraints described above with respect to definition 2. As noted above, the target sample states can be maintained to be the initial sample states |ξ_(k)

and |k

, where only the amplitudes are modified.

Optionally, at step 710, the system 306 can receive a read request through the I/O interface 304 from the conventional computer 302. In response, the quantum computation module 310 and the quantum measurement module 312 can discard the ancillary register(s) and can output data associated with the set of primary registers for the target quantum state. The data can be deduced by the quantum measurement module 312 from measurements it conducts on the quantum memory 309.

The optimality of the method is now explored. Returning again to Table 1, it should be noted that the cost of this quantum algorithm can be characterized as follows:

Lemma 1. Algorithm

_(QRS) solves QSAMPLING_(α→β) ^(c) for p_(min)≦c≦p_(max) with O(1/√{square root over (q)}) queries to O and O^(†), where q is the optimal value of the following SDP:

$\begin{matrix} {\max_{M \succcurlyeq 0}{{TrM}\mspace{14mu} {s.t.\mspace{14mu} \begin{matrix} {{\forall{{k\text{:}\mspace{14mu} \alpha_{k}^{2}} \geq M_{kk}}},} \\ {{{Tr}\left\lbrack {\left( {\beta {{\cdot \beta^{T}} - {cI}}} \right)M} \right\rbrack} \geq 0} \end{matrix}}}} & (11) \end{matrix}$

Proof. Let β·β^(T) be the projector onto β and M be the Gram matrix of vectors α_(k)Π|φ_(k)

. Then the entries of B and M are given by

B _(kl):=β_(k)β_(l) , M _(kl):=α_(k)α_(l)

φ_(k)|Π|φ_(l)

  (12)

Quantities q and p introduced in equations (5) and (7) can be expressed in terms of B and M as follows:

$\begin{matrix} {{q = {Trm}},{p = {\frac{1}{q}{{{Tr}({BM})}.}}}} & (13) \end{matrix}$

The running time T=Θ(1/√{square root over (q)}) should be minimized, which is equivalent to maximizing q, by keeping the success probability p at least some constant c. Note that p≧c is equivalent to Tr(BM)≧cTrM. This can be rewritten as Tr(BM)−cTrM=Tr[(B−cI)M]≧0. Thus, we obtain the SDP in Eq. (11).

3.2 Cost Analysis

The cost of the algorithm of Table 1 is determined herein below by solving the SDP in Lemma 1.

Lemma 2. If p_(min)≦c≦p_(max), then the SDP in Lemma 1 achieves its maximum at M=ε·ε^(T) with the objective value equal to ∥ε∥₂ ², where vector ε has components ε_(k)=min{α_(k),γβ_(k)} and γ=[0,1], is such that

β_(T) ·{circumflex over (ε)}=√{square root over (c)}  (14)

Proof We show that the optimal value of the SDP (11) can be attained by a rank-1 matrix M. Imposing the additional constraint that M can be written as M=ε·ε^(T) for some ε∈R_(n) the optimization problem (11) reduces to

$\begin{matrix} {{\max \; ɛ_{k}} \geq {0{ɛ}_{2}^{2}\mspace{14mu} {s.t.\mspace{14mu} \begin{matrix} {{\forall{{k\text{:}\mspace{14mu} \alpha_{k}} \geq ɛ_{k} \geq 0}},} \\ {{\beta^{T} \cdot \hat{ɛ}} \geq \sqrt{c}} \end{matrix}}}} & (15) \end{matrix}$

We show that the optimal value is attained by a vector ε such that ε_(k)=min{α_(k),γβ_(k)} and β^(T)·{circumflex over (ε)}≧√{square root over (c)}. This vector satisfies the constraints in (15) and is therefore a feasible point, which implies that the objective value of (11) is at least ∥ε∥₂ ².

We now find a feasible dual solution that gives the same objective value for the dual of SDP (11), which can be written as

min_(λ) _(k) _(≧0,μ≧0)Σ_(k=1) ^(n)λ_(k)α_(k) ² s.t. Λ−I+μ(cI−B)≧0,  (16)

where Λ:=diag(λ_(k)|k=1, . . . , n). Indeed, if an objective value is feasible for both the primal and the dual, it implies that this is the optimal value.

It can be shown that the following solution is feasible for the dual:

$\begin{matrix} {{\lambda_{k} = {{\mu \left( {{\frac{\beta_{k}}{ɛ_{k}}{\sum\limits_{l = 1}^{n}{\beta_{l}ɛ_{l}}}} - c} \right)} + 1}},{\mu = \frac{1 - {ɛ}_{2}^{2}}{c - {\left( {\sum\limits_{l = 1}^{n}{\beta_{l}ɛ_{l}}} \right) \cdot \left( {\sum\limits_{l = 1}^{n}\frac{\beta_{k}\alpha_{k}^{2}}{ɛ_{k}}} \right)}}}} & (17) \end{matrix}$

This choice yields ∥ε∥₂ ² as the dual objective value, so it remains to show that it satisfies the constraints in (16). First, we prove that μ≧0, which is equivalent to

$\begin{matrix} {{\left( {\sum\limits_{l = 1}^{n}{\beta_{l}ɛ_{l}}} \right) \cdot \left( {\sum\limits_{k = 1}^{n}\frac{\beta_{k}\alpha_{k}^{2}}{ɛ_{k}}} \right)} \leq {c.}} & (18) \end{matrix}$

The vector α can be decomposed into two orthogonal parts such that α=α_(≦)+α_(>), where α_(≦) corresponds to components α_(k) such that α_(k)≦γβ_(k), and α_(>) corresponds to the remaining components. Decomposing β and ε similarly, we have ε=α_(≦)+γβ_(>). The following are straightforward

1=∥α_(≦)∥₂ ²+∥α_(>)∥₂ ²  (19)

∥ε∥₂ ²=∥α_(≦)∥₂ ²+γ∥β_(>)∥₂ ²  (20)

ε·β=α_(≦)·β_(≦)+γ∥β_(>)∥₂ ²  (21)

Using these equalities, we obtain

$\begin{matrix} {{\sum\limits_{k = 1}^{n}\frac{\beta_{k}\alpha_{k}^{2}}{ɛ_{k}}} = {{\alpha_{\leq} \cdot \beta_{\leq}} + {\frac{1}{\gamma}{\alpha_{>}}_{2}^{2}}}} & (22) \\ {\mspace{115mu} {= {{\alpha_{\leq} \cdot \beta_{\leq}} + {\frac{1}{\gamma}\left( {1 - {\alpha_{\leq}}_{2}^{2}} \right)}}}} & (23) \\ {\mspace{115mu} {{= ɛ}{{\cdot \beta} + {\frac{1}{\gamma}\left( {1 - {ɛ}_{2}^{2}} \right)}}}} & (24) \end{matrix}$

Therefore, the left hand side of (18) can be written as

$\begin{matrix} \begin{matrix} {{\left( {\sum\limits_{l = 1}^{n}{\beta_{l}ɛ_{l}}} \right) \cdot \left( {\sum\limits_{k = 1}^{n}\frac{\beta_{k}\alpha_{k}^{2}}{ɛ_{k}}} \right)} = {\left( {ɛ \cdot \beta} \right)^{2} + {\frac{ɛ \cdot \beta}{\gamma}\left( {1 - {ɛ}_{2}^{2}} \right)}}} \\ {= {{c{ɛ}_{2}^{2}} + {\frac{ɛ \cdot \beta}{\gamma}\left( {1 - {ɛ}_{2}^{2}} \right)}}} \\ {= {{\left( {c - \frac{ɛ \cdot \beta}{\gamma}} \right){ɛ}_{2}^{2}} + \frac{{ɛ \cdot}\beta}{\gamma}}} \end{matrix} & \begin{matrix} \begin{matrix} \begin{matrix} \begin{matrix} \begin{matrix} (25) \\ \; \end{matrix} \\ \; \end{matrix} \\ (26) \end{matrix} \\ \; \end{matrix} \\ (27) \end{matrix} \end{matrix}$

where (14) has been used. Since ε_(k)≦γβ_(k), we have ∥ε∥₂ ²≦γε·β, which, together with (14) implies that

$\frac{ɛ \cdot \beta}{\gamma} \leq {c.}$

Together with ∥ε∥₂ ²≦∥α∥₂ ²=1 this implies

$\begin{matrix} {{{{\left( {c - \frac{ɛ \cdot \beta}{\gamma}} \right){ɛ}_{2}^{2}} + \frac{ɛ \cdot \beta}{\gamma}} \leq c},} & (28) \end{matrix}$

which proves (18) and, in turn, μ≧0.

We now show that λ_(k)≧0 for all k∈[n]. From equations (17), we see that this is equivalent to showing

$\begin{matrix} {{{\frac{\beta_{k}}{ɛ_{k}}{ɛ \cdot \beta}} - c} \geq {- \frac{c - {{ɛ \cdot \beta}{\sum\limits_{k = 1}^{n}\frac{\beta_{k}\alpha_{k}^{2}}{ɛ_{k}}}}}{1 - {ɛ}_{2}^{2}}}} & (29) \end{matrix}$

Note that 1≧∥ε∥₂ ². By multiplying out everything with 1−∥ε∥₂ ² and expanding, the following is obtained

$\begin{matrix} {{{\frac{\beta_{k}}{ɛ_{k}}{ɛ \cdot {\beta \left( {1 - {ɛ}_{2}^{2}} \right)}}} + {c{ɛ}_{2}^{2}}} \geq {{ɛ \cdot \beta}{\sum\limits_{k = 1}^{n}\frac{\beta_{k}\alpha_{k}^{2}}{ɛ_{k}}}}} & (30) \end{matrix}$

Note that c∥ε∥₂ ²=(ε·β)²; thus, after rearranging terms and dividing by ε·β, the following is obtained

$\begin{matrix} {{\frac{\beta_{k}}{ɛ_{k}}\left( {1 - {ɛ}_{2}^{2}} \right)} + {{ɛ \cdot \beta}{\sum\limits_{k = 1}^{n}{\frac{\beta_{k}\alpha_{k}^{2}}{ɛ_{k}}.}}}} & (31) \end{matrix}$

If equation (24) is applied to the right hand side, the following is obtained

$\begin{matrix} {{{\frac{\beta_{k}}{ɛ_{k}}\left( {1 - {ɛ}_{2}^{2}} \right)} + {ɛ \cdot \beta}} \geq {{ɛ \cdot \beta} + {\frac{1}{\gamma}{\left( {1 - {ɛ}_{2}^{2}} \right).}}}} & (32) \end{matrix}$

After simplification, this yields ε_(k)≦γβ_(k), which is true by definition of ε. Thus, we have λ_(k)≧0.

Finally, it remains to show that the following matrix is semidefinite positive

$\begin{matrix} {{\Lambda - I + {\mu \left( {{cI} - B} \right)}} = {{\mu \left\lbrack {{\left( {\sum\limits_{l = 1}^{n}{\beta_{l}ɛ_{l}}} \right) \cdot {{diag}\left( {\beta_{k}/ɛ_{k}} \right)}} - B} \right\rbrack}.}} & (33) \end{matrix}$

Since μ≧0, it is the case if and only if

$\begin{matrix} {\forall{v \in {{R^{n}\text{:}\mspace{14mu} {\left( {\sum\limits_{l = 1}^{n}{\beta_{l}ɛ_{l}}} \right) \cdot \left( {\sum\limits_{k = 1}^{n}\frac{v_{k}^{2}\beta_{k}}{ɛ_{k}}} \right)}} \geq {\left( {\sum\limits_{k = 1}^{n}{v_{k}\beta_{k}}} \right)^{2}.}}}} & (34) \end{matrix}$

This follows by Cauchy-Schwarz inequality:

(Σ_(l=1) ^(n)β_(l)ε_(l))·(Σ_(k=1) ^(n) v _(k) ²β_(k)/ε_(k))≧(Σ_(k=1) ^(n)√{square root over (β_(k)ε_(k))}·√{square root over (v _(k) ²β_(k)/ε_(k))})².

3.3 Single Ancillary Qubit Case

As demonstrated above, the optimal solution of the SDP (11) is a rank-1 matrix. Thus, for algorithms of the type considered above in section 3.1, there is, in most cases, no benefit of using more than one extra qubit as ancilla. Using that as a premise, a simplified description of the same algorithm is provided and the intuition behind the way it operates is explained.

Let ε∈R^(n) be the vector that corresponds to the optimal solution of problem (15), as defined in Lemma 2. Then, for given s and each k=1, . . . , n, a single-qubit unitary operation, as noted above, R(k) is defined as follows:

$\begin{matrix} {{R(k)}:={\frac{1}{\alpha_{k}}\begin{pmatrix} \sqrt{{\alpha_{k}}^{2} - ɛ_{k}^{2}} & {- ɛ_{k}} \\ ɛ_{k} & \sqrt{{\alpha_{k}}^{2} - ɛ_{k\;}^{2}} \end{pmatrix}}} & (35) \end{matrix}$

For those k for which α_(k)=0, operation R(k) can be defined arbitrarily.

As stated above, this is a rotation by angle whose sine is equal to ε_(k)/α_(k). When applied to the last register, controlled on the value of k, the operation U_(ε):=Σ_(k=1) ^(n)I_(d)

|k

k|

R(k) corresponds to rotations by different angles in mutually orthogonal subspaces.

If U_(ε) is applied to the state |α

together with an ancillary qubit initialized in state |0

, the following is obtained:

$\begin{matrix} {{\psi_{ɛ}\rangle}:={{{U_{ɛ} \cdot {a\rangle}}{0\rangle}} = {\sum\limits_{k = 1}^{n}{{\xi_{k}\rangle}{k\rangle}{\left( {{\sqrt{{\alpha_{k}}^{2} - ɛ_{k}^{2}}{0\rangle}} + {ɛ_{k}{1\rangle}}} \right).}}}}} & (36) \end{matrix}$

This extra qubit is a quantum version of the random coin deciding whether a sample k should be accepted (with probability p_(k)=ε_(k) ²) or rejected in the classical rejection sampling method. In the quantum case, measuring this qubit in the basis {|0

,|1

} would yield the accept outcome |1

with overall probability and the corresponding post-measurement state given by

$\begin{matrix} {{q_{ɛ}:={{{\left( {{I_{d} \otimes I_{n} \otimes {1\rangle}}{\langle 1}} \right){\psi_{ɛ}\rangle}}}^{2} = {{\sum\limits_{k = 1}^{n}ɛ_{k}^{2}} = {ɛ}_{2}^{2}}}},} & (37) \\ {{\psi_{\Pi,ɛ}\rangle}:={\frac{1}{{ɛ}_{2}}{\sum\limits_{k = 1}^{n}{ɛ_{k}{\xi_{k}\rangle}{k\rangle}{{1\rangle}.}}}}} & (38) \end{matrix}$

However, in the quantum case, this state can also be obtained by using 1/∥ε∥₂ steps of amplitude amplification to amplify the accept outcome |1

. The reduced state on the first two registers of |ψ_(Π,ε)

satisfies

p _(ε):=∥(

b|

I ₂)|ψ_(Π,ε)

∥²=(β^(T)·{circumflex over (ε)})² ≧c.  (39)

Thus, a state that is sufficiently close to |b

can be prepared using O(1/∥ε∥₂) oracle calls.

FIG. 8 is a diagram of an overview of an embodiment of a quantum rejection sampling method in which only one ancillary register is employed. The output can be written in the state |b

on a dedicated output register of the quantum computer's memory 309. An example of a quantum rejection sampling algorithm in which only one ancillary register is used is provided herein below in Table 2.

TABLE 2 Quantum Rejection Sampling Algorithm Quantum rejection sampling algorithm 

_(QRS)   1. Start in initial state | 0 

 _(d)| 0 

 _(n)|  0 

 .   2. Apply U_(ε).   3.  Perform the following steps t times:   -   perform ref_(I) _(d) 

I_(n) 

 |1 

 

 1| by applying Pauli Z on the      coin register;   -   perform ref_(|ψ) _(ε )

 by applying U_(ε) ^(†), changing the relative phase      of | 0, 0, 0 

 by a factor of −1, and then applying U_(ε).   4. Discard the last register.

Here, ref_(I) _(d)

_(I) _(n)

_(|1)

_(1|)≡I_(d)

I_(n)

(I_(n)−|1

1|)=I_(d)

I_(n)

Z and ref_(|ψ) _(γ)

=I_(2dn)−2|ψ_(ε)

ψ_(ε)|=U_(ε)(I_(d)

I_(n)

I₂−2| 0, 0,0

0, 0,0|)U_(ε) ^(†).

It should be noted that the method 700 can be implemented in accordance with the algorithm of Table 2. For example, the default state | 0

_(d)| 0

_(n)| 0

can be initialized and U_(ε) can be applied in step 704. In addition, the amplification of step 706 can be implemented by applying step 3 in the algorithm of Table 2.

3.4 Matching Lower Bound

It can be shown that the algorithm described above is optimal by proving a matching lower bound. In addition to this, Lemmas 1 and 2 are used to prove Theorem 1.

Lemma 3. Any quantum algorithm solving QSAMPLING_(α→β) ^(c) for cε[p_(min), p_(max)] uses at least Ω(1/∥ε∥₂) queries to O and O^(†), where vector ε has components ε_(k)=min{α_(k),γβ_(k)} and γ∈[0,1] is such that β^(T)·{circumflex over (ε)}=√{square root over (c)}.

Proof. The lower bound is based on the hybrid argument, which consists in showing that an algorithm using a low number of queries to the oracle has trouble distinguishing different but yet similar oracles. Since the aim is to prove a lower bound, any set of oracles that will be hard to distinguish for the quantum algorithm can be chosen. Here, a set of oracles {O_(x):xε{0,1}_(n)} is considered such that the unknown states |ξ_(k)(x)

only differ in their phases, more precisely, O_(x) acts on a default state |0

as

$\begin{matrix} {{{O_{x}{\overset{\_}{0}\rangle}} = {\sum\limits_{k = 1}^{n}{\alpha_{k}{{\xi_{k}(x)}\rangle}{k\rangle}\mspace{14mu} {where}}}}{{{\xi_{k}(x)}\rangle} = {\left( {- 1} \right)^{x_{k}}{{\xi_{k}\rangle}.}}}} & (40) \end{matrix}$

We also adversarially choose the action of these oracles on states orthogonal to | 0

in such a way that

∥O _(x) |ψ

−O _(x′) |ψ

∥≦∥O _(x)| 0

−O _(x′)| 0

∥∀|ψ

⊥| 0

.  (41)

Therefore, we have

$\begin{matrix} {{{O_{x} - O_{x^{\prime \;}}}} = {{{O_{x}{\overset{\_}{0}\rangle}} - {O_{x^{\prime}}{\overset{\_}{0}\rangle}}}}} & (42) \\ {\mspace{121mu} {= {{\sum\limits_{k = 1}^{n}{{\alpha_{k}\left( {\left( {- 1} \right)^{x_{k}} - \left( {- 1} \right)^{x_{k}^{\prime}}} \right)}{\xi_{k}\rangle}{k\rangle}}}}}} & (43) \\ {\mspace{121mu} {= {2{\sqrt{\sum\limits_{k = 1}^{n}{{\alpha_{k}}^{2}\delta_{x_{k},x_{k}^{\prime}}}}.}}}} & (44) \end{matrix}$

An algorithm solving QSAMPLING_(α→β) ^(c) using T oracle calls is now considered. Let |ψ_(t)(x)

be the state of the algorithm after t≦T calls to O_(x) or O_(x) ^(†). Let us consider bit strings x and x′ that only differ in the l-th position, i.e., x′=x+e_(l), where e_(l) is the vector with a l in the l-th position and 0 everywhere else. By the hybrid argument, we have

∥|ψ_(t)(x)

−|ψ_(t)(x′)

∥≦t·∥O _(x) −O _(x′)∥=2tα ₁.  (45)

The final state can be written as

$\begin{matrix} {{{\psi_{T}(x)}\rangle} = {\sum\limits_{k = 1}^{n}{\left( {- 1} \right)^{x_{k}}{\gamma_{k}(x)}{\xi_{k}\rangle}{k\rangle}}}} & (46) \end{matrix}$

where the positive amplitudes γ_(k)(x), written as vectors γ(x), satisfy β^(T)·γ(x)≧√{square root over (c)} for each x∈{0,1}^(n) by correctness of the algorithm. Moreover, we have

∥|ψ_(T)(x)

−|ψ_(T)(x′)

∥=√{square root over (|γ_(l)(x)+γ_(l)(x′)|²+Σ_(k≠l)|γ_(k)(x)+γ_(k)(x′)|²)}{square root over (|γ_(l)(x)+γ_(l)(x′)|²+Σ_(k≠l)|γ_(k)(x)+γ_(k)(x′)|²)}{square root over (|γ_(l)(x)+γ_(l)(x′)|²+Σ_(k≠l)|γ_(k)(x)+γ_(k)(x′)|²)}{square root over (|γ_(l)(x)+γ_(l)(x′)|²+Σ_(k≠l)|γ_(k)(x)+γ_(k)(x′)|²)},  (47)

so that the hybrid argument implies

$\begin{matrix} {T \geq {\frac{1}{2\alpha_{l}}{\sqrt{{{{\gamma_{l}(x)} + {\gamma_{l}\left( x^{\prime} \right)}}}^{2} + {\sum\limits_{k \neq l}{{{\gamma_{k}(x)} + {\gamma_{k}\left( x^{\prime} \right)}}}^{2}}}.}}} & (48) \end{matrix}$

Minimizing over any acceptable set of final states illustrates that the optimal value of the following optimization program is a lower bound on the query complexity of the problem

$\begin{matrix} {\mspace{20mu} {{\min_{\gamma {(x)}}{T\mspace{14mu} {s.t.\mspace{14mu} {\forall k}}}},{{x\text{:}{\gamma_{k}(x)}} \geq 0},{{\forall{x\text{:}\mspace{14mu} {{\gamma (x)}}}} = 1},{\forall x},{{l\text{:}\mspace{14mu} \frac{1}{4\alpha_{l}^{2}}\left( {{{{\gamma_{,l}(x)} + {\gamma_{l}\left( {x + e_{l}} \right)}}}^{2} + {\sum\limits_{k \neq l}{{{\gamma_{k}(x)} - {\gamma_{k}\left( {x + e_{l}} \right)}}}^{2}}} \right)} \leq T^{2}},\mspace{20mu} {\forall{{x\text{:}\mspace{14mu} {\beta^{T} \cdot {\gamma (x)}}} \geq \sqrt{c}}}}} & (49) \end{matrix}$

We first relax the constraint ∥γ(x)∥=1 to ∥γ(x)∥≦1, which can only decrease the optimal value, therefore still providing a lower bound. We then show that the optimal value can be attained for vectors γ(x) that are independent of x. Indeed, let γ(x) define any feasible point, and consider the average vector

$\begin{matrix} {\gamma^{\prime} = {\frac{1}{2^{n}}{\sum\limits_{x \in {\{{0,1}\}}^{n}}{{\gamma (x)}.}}}} & (50) \end{matrix}$

Since β_(T)·γ(x)≧√{square root over (c)} and ∥γ(x)∥=1 for all x, we have β^(T)·γ′≧√{square root over (c)} and ∥γ′∥≦1 (by the triangle inequality). Below it will be shown that the norm can be increased back to 1. We now show that the third constraint in (49) is satisfied by γ′, that is, we will show that γ_(l)′/α_(l)<T for all l. We have

$\begin{matrix} {\mspace{79mu} {\frac{\gamma_{l}^{\prime}}{\alpha_{l}} = {\frac{1}{2^{n}}{\sum\limits_{x \in {\{{0,1}\}}^{n}}\frac{{\gamma_{l}(x)} + {\gamma_{l}\left( {x + e_{l}} \right)}}{2\alpha_{l}}}}}} & (51) \\ {{\leq {\frac{1}{2^{n}}{\sum\limits_{x \in {\{{0,1}\}}^{n}}{\frac{1}{2\alpha_{l}}\sqrt{{{{\gamma_{l}(x)} + {\gamma_{l}\left( {x + e_{l}} \right)}}}^{2} + {\sum\limits_{k \neq l}{{{\gamma_{k}(x)} + {\gamma_{k}\left( {x + e_{l}} \right)}}}^{2}}}}}} \leq T},} & (52) \end{matrix}$

since each term in the sum is less than T by assumption. To show that if ∥γ′∥₂<1 this norm to can be increased to 1 by modifying some components, we show that not all the constraints γ_(l)′/α_(l)≦T can be saturated. Indeed, in that case we would have γ′=Tα with T<1 since ∥γ′∥₂<∥α∥₂=1. However, constraint β_(T)·γ′(x)≧√{square root over (c)} then implies β^(T)·α≧√{square root over (c)}, which contradicts the assumption c≧p_(min).

If ∥γ′∥₂<1, let l be such that γ_(l)′/α_(l)<T. We increase γ_(l)′ until either ∥γ∥=1 or γ_(l)′/α_(l)=T. We then repeat with another l such that γ_(l)/α_(l)<T, until we reach ∥γ∥=1. Note that while doing so, the other constraints remain satisfied, therefore we have proved that the optimization program admits feasible points where vectors γ(x) are independent of x. This implies that we can impose this additional constraint without modifying the optimal value of the program. Therefore, the program reduces to

min_(γ) T s.t. ∥γ∥=1

0≦γ_(k) ≦Tα _(k) ∀k,

β^(T) ·γ≧√{square root over (c)}  (53)

Setting ε=γ/T, we see that this is the same program as in Eq. (15), whose solution is therefore given by Lemma 2.

Now, all the elements to prove Theorem 1 have been obtained.

Theorem 1. Let p_(min):=(β^(T)·α)² and p_(max):=Σ_(k:α) _(k) _(>0)|β_(k)|². The quantum query complexity of QSAMPLING_(α→β) ^(p) for p∈[p_(min), p_(max)] is Θ(1/∥ε∥₂) where ε_(k)=min{α_(k),γβ_(k)} for γ∈[0,1] such that β_(T)·{circumflex over (ε)}=√{square root over (p)}. For p≦p_(min) the query complexity is 1, and for p>p_(max), it is infinite.

Proof. When p≦p_(min), the state |a

is already close enough to |b

to satisfy the constraint on the success probability, therefore one call to O is sufficient, which is clearly optimal. When p>p_(max), the oracle gives no information about some of the unknown states |ξ_(k)

(when α_(k)=0), but the target state should have some overlap on |ξ_(k)

|k

) to satisfy the constraint on the success probability; therefore, the problem is not solvable.

For the general case p_(min)≦p≦p_(max), the upper bound comes from the algorithm in Lemma 1, whose cost is characterized in Lemma 2, and the matching lower bound is given in Lemma 3.

4 Application: Boolean Hidden Shift Problem

We demonstrate an application of the methods to the hidden shift problem in which we show that hidden shifts can be determined at a cost that can be completely determined by properties of the Fourier spectra of the functions alone.

4.1 Fourier Analysis on the Boolean Cube

Fourier analysis on the Boolean cube studies the 2^(n)-dimensional vector space of all real-valued functions defined on the n-dimensional Boolean cube F₂ ^(n). Thus, in the following definition, ƒ denotes a function of the from F₂ ^(n)→R (not a Boolean function). The Boolean case is discussed later.

Definition 4 (Fourier transform). The Fourier basis of F₂ ^(n) consists of functions {χ_(w):w∈F₂ ^(n)}, where each χ_(w):F₂ ^(n)→{1,−1} is defined as ψ_(w)(x):=(−1)^(w·x), where w·x:=Σ_(i=1) ^(n)w_(i)x_(i) is the inner product in F₂. The Fourier transform of a function ƒ:F₂ ^(n)→R is the function {circumflex over (ƒ)}:F₂ ^(n)→R defined as

$\begin{matrix} {{\hat{f}(w)}:={\frac{1}{2^{n}}{\sum\limits_{x \in F_{2}^{n}}{\left( {- 1} \right)^{w \cdot x}{{f(x)}.}}}}} & (54) \end{matrix}$

Note that

${{\hat{f}(w)}:={{E_{x}\left( {X_{w}f} \right)} = {\frac{1}{2^{n}}{\sum\limits_{x \in F_{2}^{n}}{{X_{w}(x)}{f(x)}}}}}},$

which is another way to write the Fourier coefficients that is predominantly found in the computer science literature. The set {{circumflex over (ƒ)}(w):w∈F₂ ^(n)} of all values of {circumflex over (ƒ)} is called the spectrum of ƒ and each of its elements is called a Fourier coefficient of ƒ.

A Boolean function of the form ƒ: F₂ ^(n)→F₂ is now considered. To find its Fourier transform, ƒ should be associated with a real-valued function F:F₂ ^(n)→R in some way. Instead of the obvious correspondence (treating 0,1∈F₂ as real numbers) for the purposes here it is more natural to let F be the (±1)-valued function defined by

F(x):=(−1)^(ƒ(x)).  (55)

Definition 5 (Fourier transform of a Boolean function). By slight abuse of notation, the Fourier transform of a Boolean function ƒ:F₂ ^(n)→F₂ is the function {circumflex over (ƒ)}:F₂ ^(n)→R defined as

$\begin{matrix} {{\hat{f}(w)}:={{E_{x\;}\left( {\chi_{w}F} \right)} = {\frac{1}{2^{n}}{\sum\limits_{x \in F_{2}^{n}}{\left( {- 1} \right)^{{w \cdot x} + {f{(x)}}}.}}}}} & (56) \end{matrix}$

The Fourier transform of a Boolean function can also be expressed using the Hadamard transform which is the unitary matrix defined by

$\begin{matrix} {H_{2^{n}}:={\frac{1}{\sqrt{2^{n}}}{\sum\limits_{x,{y \in F_{2}^{n}}}{\left( {- 1} \right)^{x \cdot y}{{{x{\langle y}}\rangle}.}}}}} & (57) \end{matrix}$

This transformation can be obtained as the n-fold tensor product of the matrix

$H_{2^{n}}:={\frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & {- 1} \end{pmatrix}}$

with itself, or in other words H₂ _(n) =

. Clearly, we can compute the vector of Fourier coefficients └{circumflex over (ƒ)}(w)┘_(w) from the (normalized) vector of inputs

${\frac{1}{\sqrt{2^{n}}}\left\lbrack \left( {- 1} \right)^{f{(x)}} \right\rbrack}_{x}.$

Definition 6 (Bent functions). Let ƒ:F₂ ^(n)→F₂ be a Boolean function. We say that ƒ is bent if the Fourier coefficients

${\hat{f}(w)} = {\frac{1}{2^{n}}{\sum\limits_{x \in F_{2}^{n}}\left( {- 1} \right)^{{w \cdot x} + {f{(x)}}}}}$

satisfy |{circumflex over (ƒ)}(w)|=2^(−n/2) for all w∈F₂ ^(n), i.e., if the spectrum of ƒ is flat.

A necessary condition for bent functions in n variables to exist is that n is even. If ƒ is bent, then this implicitly defines another Boolean function via 2^(n/2){circumflex over (ƒ)}(w)=: (−1)^(ƒ*(w)). Then this function ƒ* is again a bent function and called the dual bent function of ƒ. By taking the dual twice we obtain ƒ back: (ƒ*)*=ƒ.

A simple example of a bent function is provided by the inner product function. The most simple instance is the function ƒ(x, y):=xy where x, y∈F₂. It is easy to verify that ƒ defines a bent function. This can be generalized to 2n variables and we obtain the inner product

$\begin{matrix} {{{ip}_{n}\left( {x_{1},\ldots \mspace{14mu},x_{n},y_{1},\ldots \mspace{14mu},y_{n}} \right)}:={\sum\limits_{i = 1}^{n}{x_{i}{y_{i}.}}}} & (58) \end{matrix}$

It is straightforward to show that ip_(n) is bent.

While many other examples of bent functions have been constructed, no complete classification is known. Besides the flatness of the Fourier spectrum, many equivalent characterizations of bent functions are known. One of these characterizations is that the truth table of a bent function, when considered as a binary vector of length 2^(n), has the maximal possible Hamming distance from the linear code formed by the set of truth tables of all affine Boolean functions in n variables.

4.2 Quantum Algorithm for the Boolean Hidden Shift Problem

The following is a description of how the quantum algorithm for QSAMPLING_(α→β) can be applied to the Boolean hidden shift problem BHSP_(ƒ).

Theorem 2. Let ƒ be a Boolean function and {circumflex over (ƒ)} denote its Fourier transform. The quantum query complexity of solving BHSP_(ƒ) with success probability p is O(1/∥ε∥₂), where ε_(w)=min{|{circumflex over (ƒ)}_(w)|,γ/√{square root over (2^(n))}} for γ∈[0,1] such that ∥{circumflex over (ε)}∥₁=√{square root over (2^(n) p)}.

Proof. O_(ƒ) _(s) is used to denote the phase oracle for function ƒ_(s). This is a diagonal matrix that acts on the standard basis vectors x∈F₂ ^(n) as follows:

O _(ƒ) _(x) |x

:=(−1)^(ƒ(x+s)) |x

.  (59)

Note that O_(ƒ) ₀ corresponds to the original unshifted function ƒ. We now consider the quantum oracle O_(f) _(s) conjugated by Hadamard transform. The resulting operation

V(s):=

O _(ƒ) _(s)

  (60)

is very useful, since, when acting on a register initialized in all-zeros state, it can be used to prepare the following quantum superposition:

$\begin{matrix} {{{\psi_{\hat{f}}(s)}\rangle}:={{{V(s)}{0\rangle}^{\otimes n}} = {\sum\limits_{w \in F_{2}^{n}}{\left( {- 1} \right)^{w \cdot s}{\hat{f}(w)}{{w\rangle}.}}}}} & (61) \end{matrix}$

Indeed, it acts on |0

as

$\begin{matrix} {{0\rangle}^{\otimes n}\overset{H^{\otimes n}}{\mapsto}{\frac{1}{\sqrt{2^{n}}}{\sum\limits_{w \in F_{2}^{n}}{x\rangle}}}\overset{O_{f_{s}}}{\mapsto}{\frac{1}{\sqrt{2^{n}}}{\sum\limits_{w \in F_{2}^{n}}{\left( {- 1} \right)^{f{({x + s})}}{x\rangle}}}}} & (62) \\ {\overset{H^{\otimes n}}{\mapsto}{\frac{1}{2^{n}}{\sum\limits_{x,{w \in F_{2}^{n}}}{\left( {- 1} \right)^{{w \cdot x} + {f{({x + s})}}}{x\rangle}}}}} & (63) \\ {= {\sum\limits_{w \in F_{2}^{n}}{\left( {- 1} \right)^{w \cdot s}\left( {\frac{1}{2^{n}}{\sum\limits_{w \in F_{2}^{n}}\left( {- 1} \right)^{{w \cdot x} + {f{(x)}}}}} \right){w\rangle}}}} & (64) \end{matrix}$

If the Fourier coefficients {circumflex over (ƒ)}(w) could be eliminated from state |ψ_({circumflex over (ƒ)})(s)

, the following state would be obtained

$\begin{matrix} {{{\psi (s)}\rangle}:={\frac{1}{\sqrt{2^{n}}}{\sum\limits_{w \in F_{2}^{n}}{\left( {- 1} \right)^{w \cdot s}{\hat{f}(w)}{w\rangle}}}}} & (65) \end{matrix}$

from which the hidden shift s can be easily recovered by applying the Hadamard transform

. Fortunately, the problem of transforming the state |ψ_({circumflex over (ƒ)})(s)

to |ψ(s)

is a special case of QSAMPLING_(α→β) with

α_(w):=|{circumflex over (ƒ)}(w)|, β_(w):=1/√{square root over (2^(n))}, |ξ_(k)

_(:=(−)1)^(w·s)|0

.  (66)

As a consequence, Theorem 1 immediately provides a quantum algorithm for solving this problem.

4.3 Boosting the Success Probability

As noted above, the hidden shift can be found with constant probability. However, it is not immediately clear how to boost this probability close to 1, as checking if a given s is indeed a hidden shift could potentially utilize 2^(n) queries to the shifted function ƒ_(s), which might be significantly more than was needed to obtain a candidate shift.

How to boost the success probability to any constant is now shown. The basic idea is to check a potential solution using the standard controlled-SWAP test. Let s be the actual shift, and v be a candidate solution to be checked. Using one call to the oracle O_(ƒ) _(s) , the following state can be easily prepared

$\begin{matrix} {{{\varphi_{f}(s)}\rangle} = {\frac{1}{\sqrt{2^{n}}}{\sum\limits_{x}{\left( {- 1} \right)^{f{({x + s})}}{x\rangle}}}}} & (67) \end{matrix}$

Similarly, the state |φ_(ƒ)(v)

can be prepared using one call to the oracle O_(ƒ) ₀ . The inner product between these states is

$\begin{matrix} \begin{matrix} {{\langle{{\varphi_{f}(s)}{{\varphi_{f}(v)}\rangle}}\rangle} = {\frac{1}{2^{n}}{\sum\limits_{x}\left( {- 1} \right)^{{f{({x + s})}} + {f{({x + v})}}}}}} \\ {= {1 - {2_{{\gamma \; f},{s + v}}.(69)}}} \end{matrix} & (68) \end{matrix}$

Therefore, a controlled-SWAP test will accept the candidate shift v with probability

$\begin{matrix} {\frac{1 + {\langle{{\varphi_{f}(s)}{{\varphi_{f}(v)}\rangle}}\rangle}}{2} = {1 -_{\;_{{\gamma \; f},{s + v}},}}} & (70) \end{matrix}$

That is, it will always accept if s=v, and reject with probability at least γƒ otherwise. Repeating the controlled-SWAP test O(1/γƒ) times can ensure that a wrong candidate solution is rejected with large probability. Moreover, using once again quantum amplitude amplification, a quadratic improvement can be obtained, and therefore a wrong candidate can be rejected using only

$O\left( \frac{1}{\sqrt{\gamma \; f}} \right)$

oracle calls.

To boost the success probability of the algorithm from ½ to any constant, it then suffices to repeat the algorithm

_(1/2) and checking its output using the controlled-SWAP test until a candidate solution is accepted. Note that both steps require

$O\left( \frac{1}{\sqrt{\gamma \; f}} \right)$

oracle calls and are repeated a constant number of times, therefore the overall cost of the algorithm only increases by a constant factor.

4.4 Hidden Shift Problem Example

To illustrate how the quantum rejection sampling methods described above can be applied is the hidden shift problem, a simple example is provided below in Tables 3 and 4. Here, one is given access to two functions, where one function is a shifted version of the other function and the task is to identify the shift. For example, the function ƒ_(s)=ƒ(x+s) is a shifted version of ƒ(x) with a shift s. In the example of Tables 3 and 4, the shift is s=10.

TABLE 3 Hidden Shift Problem Example - Original function f(x) x f(x) 00 0 01 1 10 1 11 0

TABLE 4 Hidden Shift Problem Example - Shifted function f_(s) = f(x + s) x f_(s)(x) 00 1 01 0 10 0 11 1

For hidden shift problems in general, finding the hidden shift s becomes difficult once the number of variables increases to some moderate number. Under some reasonable assumptions, it can even be shown that a classical computer cannot solve such problems efficiently at all. A quantum computer on the other hand can solve the hidden shift problem by applying a certain strategy that comprises preparing a certain quantum state first and then manipulating the amplitudes of this state into new amplitudes. This is further illustrated in FIGS. 9 and 10. For example, FIGS. 9 and 10 are diagrams, 900 and 1000, of an initial or given quantum state, Σ_(w)(−1)^(w·s){circumflex over (ƒ)}(w)|w

, and a target quantum state,

${\sum\limits_{w}{\left( {- 1} \right)^{w \cdot s}\frac{1}{\sqrt{2^{n}}}{w\rangle}}},$

respectively. In the diagrams of FIGS. 9 and 10, the horizontal axis denotes the variable w and the vertical axis denotes the value of the w^(th) component of the quantum state. The input or initial state Σ_(w)(−1)^(w·s){circumflex over (ƒ)}(w)|w

has some components that depend on the Fourier spectrum of the given function. The output or target state Σ_(w)(−1)^(w·s){circumflex over (ƒ)}(w)|w

does not have a dependence on the Fourier spectrum anymore and contains the information about the hidden shift in the form of a basis state of a complex character from which the shift can be easily extracted based on the methods described above. Here, the quantum rejection method described above can do away with the Fourier coefficients {circumflex over (ƒ)}(w). The resulting quantum algorithm can use a “water-filling” of the Fourier spectrum to perform the controlled rotations that occur in the quantum rejection method.

The techniques described herein can be applied to solve the hidden shift problem for any Boolean function ƒ. Here, the complexity of the resulting algorithm depends on the Fourier spectrum of ƒ. In the limiting cases of flat or highly peaked Fourier spectra, it can be shown that Table 5, below, accurately summarizes what is known about the quantum and the classical query complexities of these two external problems.

TABLE 5 Complexity of Resampling Algorithms for hidden shift problem for Bent functions and Delta functions Functions Classical Quantum Bent functions Ω(n) 1 Delta Θ(2^(n)) Θ({square root over (2^(n))}) functions

For a general Boolean function, the hidden shift problem can be seen as lying somewhere between these two extreme cases.

As indicated above, the quantum rejection methods described herein can be used to prepare certain quantum states. In accordance with one example, the quantum states can be prepared efficiently in the memory of a quantum computer. The ability to perform quantum state preparations can be an important tool for the design of quantum algorithms. However, it should be understood that the methods described herein can be applied outside the realm of quantum computing. For example, the methods can be applied in the field of quantum physics itself. For example, the methods can be utilized in situations where the goal is to prepare a desired quantum population on the energy levels of a system.

Having described preferred embodiments of quantum rejection sampling systems and methods (which are intended to be illustrative and not limiting), it is noted that modifications and variations can be made by persons skilled in the art in light of the above teachings. It is therefore to be understood that changes may be made in the particular embodiments disclosed which are within the scope of the invention as outlined by the appended claims. Having thus described aspects of the invention, with the details and particularity required by the patent laws, what is claimed and desired protected by Letters Patent is set forth in the appended claims. 

1. A method for transforming an initial quantum state, denoted by superposed initial quantum sample states, to a target quantum state, denoted by superposed target quantum sample states, comprising: initializing the initial quantum state with a set of primary registers for the initial quantum state and with at least one ancillary register; transforming the initial quantum state such that the set of primary registers reflects the initial quantum sample states and such that the at least one ancillary register is varied to compose an intermediate quantum state; and amplifying the intermediate quantum state by implementing quantum state rotations in accordance with a plurality of reflections on the intermediate quantum state such that the reflections result in the target quantum sample states of the target quantum state with a discarding of the at least one ancillary register.
 2. The method of claim 1, further comprising: in response to a read request, outputting data associated with the set of primary registers for the target quantum state and discarding the at least one ancillary register.
 3. The method of claim 1, wherein each of the initial quantum sample states has a respective initial amplitude, wherein each of the target quantum sample states has a respective target amplitude and wherein the transforming the initial quantum state transforms the initial quantum state such that the set of primary registers reflects the initial amplitudes.
 4. The method of claim 3, wherein the target sample states are the same as the initial quantum sample states after the amplifying.
 5. The method of claim 4, wherein the target amplitudes are different from the initial amplitudes as a result of the amplifying.
 6. The method of claim 1, wherein the at least one ancillary register is only one ancillary register.
 7. The method of claim 1, wherein the transforming the initial quantum state varies the at least one ancillary register to an arbitrary value.
 8. The method of claim 1, wherein the transforming the initial quantum state applies a controlled quantum state rotation by a pre-computed angle.
 9. A computer readable storage medium comprising a computer readable program, wherein the computer readable program when executed on a computer causes the computer to direct the transformation of an initial quantum state, denoted by superposed initial quantum sample states, to a target quantum state, denoted by superposed target quantum sample states, by performing the steps of: initializing the initial quantum state with a set of primary registers for the initial quantum state and with at least one ancillary register; directing a transformation of the initial quantum state such that the set of primary registers reflects the initial quantum sample states and such that the at least ancillary register is varied to compose an intermediate quantum state; and directing an amplification of the intermediate quantum state by implementing quantum state rotations in accordance with a plurality of reflections on the intermediate quantum state such that the reflections result in the target quantum sample states of the target quantum state with a discarding of the at least one ancillary register.
 10. The computer readable storage medium of claim 9, wherein the steps further comprise: in response to a read request, outputting data associated with the set of primary registers for the target quantum state and discarding the at least one ancillary register.
 11. The computer readable storage medium of claim 9, wherein each of the initial quantum sample states has a respective initial amplitude, wherein each of the target quantum sample states has a respective target amplitude and wherein the transformation of the initial quantum state transforms the initial quantum state such that the set of primary registers reflects the initial amplitudes.
 12. The computer readable storage medium of claim 11, wherein the target sample states are the same as the initial quantum sample states after the amplification, wherein the target amplitudes are different from the initial amplitudes as a result of the amplification and wherein the at least one ancillary register is only one ancillary register.
 13. A system for transforming an initial quantum state, denoted by superposed initial quantum sample states, to a target quantum state, denoted by superposed target quantum sample states, comprising: a quantum memory element; a quantum interaction controller configured to change quantum states of the quantum memory element by implementing quantum state rotations; and a quantum computation module configured to initialize the initial quantum state with a set of primary registers for the initial quantum state and with at least one ancillary register, to direct the quantum interaction controller to transform the initial quantum state such that the set of primary registers reflects the initial quantum sample states and the at least one ancillary register is varied to compose an intermediate quantum state, and to direct the quantum interaction controller to amplify the intermediate quantum state by implementing the quantum state rotations in accordance with a plurality of reflections on the intermediate quantum state such that the reflections result in the target quantum sample states of the target quantum state with a discarding of the at least one ancillary register.
 14. The system of claim 13, wherein the quantum computation module is further configured to, in response to a read request, output data associated with the set of primary registers for the target quantum state and discard the at least one ancillary register.
 15. The system of claim 13, wherein each of the initial quantum sample states has a respective initial amplitude, wherein each of the target quantum sample states has a respective target amplitude and wherein the quantum computation module is further configured to direct the quantum interaction controller to transform the initial quantum state such that the set of primary registers reflects the initial amplitudes.
 16. The system of claim 15, wherein the target sample states are the same as the initial quantum sample states after the amplification by the quantum interaction controller.
 17. The system of claim 16, wherein the target amplitudes are different from the initial amplitudes as a result of the amplification by the quantum interaction controller.
 18. The system of claim 13, wherein the at least one ancillary register is only one ancillary register.
 19. The system of claim 13, wherein the quantum computation module is further configured to direct the quantum interaction controller to transform the initial quantum state such that the at least one ancillary register is set to an arbitrary value.
 20. The system of claim 13, wherein the quantum computation module is further configured to direct the quantum interaction controller to transform the initial quantum state such that the quantum interaction controller applies a controlled quantum state rotation by a pre-computed angle. 